﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace MyTemplate
{
    /// <summary>
    /// Summary description for LoginObj
    /// </summary>
    public class LoginObj
    {
        public string UserName { get; set; }
        public string Password { get; set; }

        public bool CheckLogin()
        {
            //Write logic to verify UserName and Password from a source (DB/File/Network resource etc.)

            User user = new User();
            if (user.GetUserByIdFromUserName(UserName, Password) >= 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public LoginObj()
        { }
    }
}